<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>额度套餐配置</title>
    <link rel="stylesheet" href="<?=adminassets?>assets/pear/component/pear/css/pear.css" />
    <link rel="stylesheet" href="<?=adminassets?>assets/css/pay_meal.css" />
</head>

<body class="pear-container">
    <div class="package-container">
        <div class="layui-card">
            <div class="layui-card-header">
                <i class="layui-icon layui-icon-rmb"></i>
                额度套餐配置
            </div>
            <div class="layui-card-body">
                <form class="layui-form" onsubmit="return saveSetting(this)" method="post" role="form">
                    <!-- 套餐一 -->
                    <div class="package-card">
                        <div class="package-title">
                            <i class="layui-icon layui-icon-cart-simple package-icon"></i>基础套餐
                        </div>
                        <div class="price-row">
                            <div class="price-item">
                                <label class="price-label">充值金额（元）</label>
                                <input type="text" name="pay_meal[0][recharge]" value="<?php echo $meals[0]['recharge']; ?>" 
                                    class="layui-input" lay-verify="required|number" placeholder="请输入充值金额">
                                <div class="hint-text">用户需支付的金额</div>
                            </div>
                            <div class="price-item">
                                <label class="price-label">到账额度</label>
                                <input type="text" name="pay_meal[0][money]" value="<?php echo $meals[0]['money']; ?>" 
                                    class="layui-input" lay-verify="required|number" placeholder="请输入到账额度">
                                <div class="hint-text">用户实际获得的额度</div>
                            </div>
                        </div>
                    </div>

                    <!-- 套餐二 -->
                    <div class="package-card">
                        <div class="package-title">
                            <i class="layui-icon layui-icon-diamond package-icon"></i>高级套餐
                        </div>
                        <div class="price-row">
                            <div class="price-item">
                                <label class="price-label">充值金额（元）</label>
                                <input type="text" name="pay_meal[1][recharge]" value="<?php echo $meals[1]['recharge']; ?>" 
                                    class="layui-input" lay-verify="required|number" placeholder="请输入充值金额">
                                <div class="hint-text">用户需支付的金额</div>
                            </div>
                            <div class="price-item">
                                <label class="price-label">到账额度</label>
                                <input type="text" name="pay_meal[1][money]" value="<?php echo $meals[1]['money']; ?>" 
                                    class="layui-input" lay-verify="required|number" placeholder="请输入到账额度">
                                <div class="hint-text">用户实际获得的额度</div>
                            </div>
                        </div>
                    </div>

                    <!-- 套餐三 -->
                    <div class="package-card">
                        <div class="package-title">
                            <i class="layui-icon layui-icon-gift package-icon"></i>至尊套餐
                        </div>
                        <div class="price-row">
                            <div class="price-item">
                                <label class="price-label">充值金额（元）</label>
                                <input type="text" name="pay_meal[2][recharge]" value="<?php echo $meals[2]['recharge']; ?>" 
                                    class="layui-input" lay-verify="required|number" placeholder="请输入充值金额">
                                <div class="hint-text">用户需支付的金额</div>
                            </div>
                            <div class="price-item">
                                <label class="price-label">到账额度</label>
                                <input type="text" name="pay_meal[2][money]" value="<?php echo $meals[2]['money']; ?>" 
                                    class="layui-input" lay-verify="required|number" placeholder="请输入到账额度">
                                <div class="hint-text">用户实际获得的额度</div>
                            </div>
                        </div>
                    </div>

                    <!-- 提交按钮 -->
                    <div class="submit-btn">
                        <button type="submit" class="pear-btn pear-btn-primary pear-btn-lg">
                            <i class="layui-icon layui-icon-ok"></i>
                            保存配置
                        </button>
                        
                    </div>
                </form>
            </div>
        </div>
    </div>

    <script src="<?=adminassets?>assets/pear/component/layui/layui.js"></script>
    <script src="<?=adminassets?>assets/pear/component/pear/pear.js"></script>
    <script src="<?=adminassets?>assets/js/core_js/set.js"></script>
</body>
</html>